In [1]:
from __future__ import division, print_function, unicode_literals

%matplotlib inline

import os

import IPython.display
import numpy as np
import utilities
import arrow

import twitter

In [26]:
session = utilities.authenticate()

path_query = os.path.join(os.path.curdir, 'tweets')

# query = 'hobbit desolation smaug'
# query = 'hobbit'
# query = 'Anchorman 2 The Legend Continues'
# query = 'Anchorman'
query = 'Hunger Games'

manager = twitter.Search_Manager(session, query, path_query)

In [27]:
print('\nStatus')
print('------')
print('client_id:  {:s}'.format(session.client_id.client_id))
print('Limit:      {:d}'.format(manager.api_limit))
print('Remaining:  {:d}'.format(manager.api_remaining))
print('Minutes:  {:5.2f}'.format(manager.api_minutes))

print()
print('Count: {:d}'.format(manager.count))


Status
------
client_id:  JxUV7dXAvXigyxyWafOGUA
Limit:      450
Remaining:  130
Minutes:   1.02

Count: 240047

In [28]:
manager.search_continuous()


Count: 240047
Search ended.

In [29]:
print('\nStatus')
print('------')
print('client_id:  {:s}'.format(session.client_id.client_id))
print('Limit:      {:d}'.format(manager.api_limit))
print('Remaining:  {:d}'.format(manager.api_remaining))
print('Minutes:  {:5.2f}'.format(manager.api_minutes))

print()
print('Count: {:d}'.format(manager.count))


Status
------
client_id:  JxUV7dXAvXigyxyWafOGUA
Limit:      450
Remaining:  122
Minutes:   0.86

Count: 240558

In [30]:



Out[30]:
u'Hunger Games'

In [ ]: